<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Unbenanntes Dokument</title>
<template>script.html</template>
</head>

<body>
<?php
        
        require_once(config::$basePath."/system/api/simplehtmldom/simple_html_dom.php");  
        
        
        $nTable=$_REQUEST['n_table'];
        $mTable=$_REQUEST['m_table'];
        
		$nmTable = $nTable."_".$mTable;       
	   

  
  $xmlTable = new xml_table();
  $xmlTable->tableName = $nmTable;
  $xmlTable->scaffolding = false;
  $tableName = $xmlTable->createTable();
  
  
   $field = new xml_table_field();
  $field->tableName = $nmTable;
  $field->fieldName = "_".$nTable;
  $field->fieldType = "join";
  $field->addTableField();
  
    
	$field = new xml_table_field();
  $field->tableName = $nmTable;
  $field->fieldName = "_".$mTable;
  $field->fieldType = "join";
  $field->addTableField();   
       
        
        

        //$redirect = "/admin/db-verwaltung?table=$table";
        $redirect="/database-management?table=$tableName";
        http::redirect($redirect);
        ?>
</body>
</html>